package com.lin.musicplayer.feature;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;

import com.lin.musicplayer.ListShow;
import com.lin.musicplayer.MusicPlay;
import com.lin.musicplayer.R;

/**
 * Created by crystal on 2016/7/8.
 */
public class Add extends Activity {
    ImageButton love,sleep,study;
    ListShow listShow=new ListShow();
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.add);
        findView();
        onClick();
    }
    public void findView()
    {
        love=(ImageButton)findViewById(R.id.loveb);
        sleep=(ImageButton)findViewById(R.id.sleepb);
        study=(ImageButton)findViewById(R.id.studyb);
    }
    private void onClick()
    {
        love.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {


                Intent intent=new Intent();
                Bundle bundle=new Bundle();
                bundle.putString("list","love");
                intent.putExtras(bundle);
                intent.setClass(Add.this,ListShow.class);
                startActivity(intent);

            }
        });
        sleep.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent=new Intent();
                Bundle bundle=new Bundle();
                bundle.putString("list","sleep");
                intent.putExtras(bundle);
                intent.setClass(Add.this,ListShow.class);
                startActivity(intent);
            }
        });
        study.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent=new Intent();
                Bundle bundle=new Bundle();
                bundle.putString("list","");
                intent.putExtras(bundle);
                intent.setClass(Add.this,ListShow.class);
                startActivity(intent);

            }
        });
    }
}
